A storage system typically includes a programmed data processor, a storage array, and a buffer cache. Most buffer caches are write-back in nature for asynchronous or fast write operations. In response to an asynchronous write request, pages of data are written to the cache, the pages in the cache are marked dirty, an acknowledgement of the write operation is returned to the originator of the write request, and some time later the pages are written to the storage array and the pages in the buffer cache are marked clean. In this fashion, the cache hides high disk latencies and avoids performance loss from disk seeks during random access.
Typically a write-back task in a cache manager program ensures that no dirty page remains in the cache for more than a certain length of time. Typically the write-back task also is designed to provide that the cache will have more than a certain minimum number of free memory pages for servicing fast write requests unless the storage system is overloaded. Typically the maximum persistence time of a dirty page in the cache is thirty seconds, and the minimum number of free pages is based on the memory capacity of the cache and is a small fraction of the memory capacity of the cache.
For example, traditional UNIX® file system managers used a periodic update policy, writing back all delayed-write data once every 30 seconds. Such a method of periodic update is easy to implement but degrades synchronous read-write response times at these periodic intervals. Some cache managers also have used high and low watermarks to address space exhaustion. If the number of dirty pages in the cache hits an upper threshold, called the high water mark, then the cache manager wrote back to the storage array as many dirty pages as needed until the number of dirty pages in the cache hit a lower threshold, called the low water mark. The dirty pages were kept on a least recently used (LRU) list so that the least recently used dirty pages were written back before the most recently used dirty pages.
Early NFS clients used relatively small local caches and frequently initiated the flush of dirty pages to the disk using commit operations sent to the storage system. The early storage systems also had relatively small caches, so that the commit operations usually occurred at a rate greater than once every three seconds. Under these conditions, the periodic update policy provided acceptable performance because a relatively small fraction of the write-back operations were performed during the periodic update. Nevertheless, it was recognized that the use of synchronous writes or commit operations limited the performance of application I/O.
Modern NFS clients, with larger local caches, improved their performance by sending multiple I/Os in parallel to the storage system, using delayed writes, without sending any commit operations and counting on the server to flush data to disk at its own leisure. In this case the server flushed the dirty pages based on its cache occupancy state, disconnected from the application intent. It was recognized that under these conditions, the periodic update policy would interfere with application I/O during periodic flushes. It was also recognized that watermark based policies would also interfere with application I/O while the number of dirty pages was being reduced from the high watermark to the low watermark. Therefore designers of data storage systems have been investigating alternative write-back cache update policies that would improve write-back performance and reduce interference with application I/O.
Some proposed update policies trickle periodical flush operation of a small number of pages as a background task with lowest priority to keep the number of dirty pages to a lower level and prevent the cache from filling up too fast. Other similar policies schedule the user data flushes as asynchronous disk writes as soon as a modification fills an entire page. At the other end of the spectrum, some proposed policies modify the watermark technique by flushing dirty pages based on retention time. Other similar policies attempt to update the retention time based on disk performance characteristics, for example by reducing the retention time to match the ratio between the buffer cache size and the disk transfer rate. Others replace the time-driven update policies with dynamic policies, which choose when to schedule disk writes based on the system load and the disk queue length.
More recently, the combination of periodic update and watermark based writeback policies used in the vast majority of storage systems has not been keeping up with the higher speeds of application incoming writes, resulting in a significant performance penalty. With larger caches and dramatic increases in the storage system workloads, the performance penalty has become more detrimental to file system and user application performance. Therefore there is renewed interest in alternative write-back cache update policies that do not require extensive changes to existing cache management programs yet would improve writeback performance and reduce interference with file system and user application performance.